package org.jeecg.modules.message.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import java.io.Serializable;
import java.util.Date;

@Data
@TableName("proc_message")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="ProcurementMessage对象", description="采购消息通知")
public class ProcurementMessage implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键id")
    @Column(name = "id")
    private String id;

    @ApiModelProperty(value = "消息标题")
    @Column(name = "title")
    private String title;

    @ApiModelProperty(value = "消息内容")
    @Column(name = "content")
    private String content;

    @ApiModelProperty(value = "消息类型:0-system,1-supplier,2-lottery,3-bid")
    @Column(name = "message_type")
    private String messageType;

    @ApiModelProperty(value = "业务类型：0-system,1-supplier,2-lottery,3-bid")
    @Column(name = "business_type")
    private String businessType;

    @ApiModelProperty(value = "业务id")
    @Column(name = "business_id")
    private String businessId;

    @ApiModelProperty(value = "发送类型")
    @Column(name = "send_type")
    private String sendType;

    @ApiModelProperty(value = "发送人")
    @Column(name = "sender")
    private String sender;

    @ApiModelProperty(value = "接收人")
    @Column(name = "receiver")
    private String receiver;

    @ApiModelProperty(value = "发送人Id")
    @Column(name = "sender_id")
    private String senderId;

    @ApiModelProperty(value = "接收人Id")
    @Column(name = "receiver_id")
    private String receiverId;

    @ApiModelProperty(value = "优先级")
    @Column(name = "priority")
    private Integer priority;

    @ApiModelProperty(value = "阅读状态：0-未读，1-已读")
    @Column(name = "read_status")
    private String readStatus;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "阅读时间")
    @Column(name = "read_time")
    private Date readTime;

    @ApiModelProperty(value = "删除状态")
    @Column(name = "is_deleted")
    private String isDeleted;

    @ApiModelProperty(value = "创建人")
    @Column(name = "create_by")
    private String createBy;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建日期")
    @Column(name = "create_time")
    private Date createTime;

    @ApiModelProperty(value = "更新人")
    @Column(name = "update_by")
    private String updateBy;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新日期")
    @Column(name = "update_time")
    private Date updateTime;
}
